package vue;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.Panel;
import java.awt.SystemColor;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JTextArea;

public class C_Panel_accueil extends Panel
{
	//Attributs
	private static final long serialVersionUID = 1L;
	private String nom_station;
	
	//Constructeur
	public C_Panel_accueil()
	{
		this.setLayout(new BorderLayout());
		
		JTextArea txtrAccueil = new JTextArea();
		txtrAccueil.setText("\n	Accueil ");
		txtrAccueil.setForeground(Color.BLUE);
		txtrAccueil.setBackground(SystemColor.menu);
		txtrAccueil.setEditable(false);
		//txtrAccueil.setBounds(105, 11, 231, 25);
		txtrAccueil.setFont(new Font("Arial Black", Font.BOLD, 18));
		this.add(txtrAccueil, BorderLayout.NORTH);
		
		JLabel image = new JLabel( new ImageIcon("accueil.jpg"));	
		this.add(image, BorderLayout.CENTER);
		this.setVisible(true);
	}
	
	public C_Panel_accueil(String p_nom_station)
	{
		this.setLayout(new BorderLayout());
		this.nom_station = p_nom_station;
		
		JTextArea txtrAccueil = new JTextArea();
		txtrAccueil.setText("\n	Accueil "+nom_station);
		txtrAccueil.setForeground(Color.BLUE);
		txtrAccueil.setBackground(SystemColor.menu);
		txtrAccueil.setEditable(false);
		//txtrAccueil.setBounds(105, 11, 231, 25);
		txtrAccueil.setFont(new Font("Arial Black", Font.BOLD, 18));
		this.add(txtrAccueil, BorderLayout.NORTH);
		
		JLabel image = new JLabel( new ImageIcon("accueil.jpg"));	
		this.add(image, BorderLayout.CENTER);
		this.setVisible(true);
	}
	
	public void Accueil_off()
	{
		this.setVisible(false);
		
	}
}

